﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using DataLayer.Entities;
using DonutMgmtSystemFoundation.Helpers;

namespace DonutMgmtSystemFoundation.Controllers
{
    public class ProfileController : BaseController
    {
        public ActionResult Index()
        {
            return View(SessionContext.GetUserData());
        }

        public JsonResult ResetPassword(string password)
        {
            ProfileHelper helper = new ProfileHelper();

            return Json(helper.ResetPassword(password));
        }

        public JsonResult SaveUserPrefs(User user)
        {
            ProfileHelper helper = new ProfileHelper();

            return Json(helper.SaveUser(user));
        }
    }
}
